--- tmux-1.9a.org/compat/imsg.h
+++ tmux-1.9a/compat/imsg.h
@@ -20,6 +20,9 @@
  */
 
 #include "tmux.h"
+#undef _GNU_SOURCE
+#define _GNU_SOURCE
+#include <sys/types.h>
 
 #define IBUF_READ_SIZE		65535
 #define IMSG_HEADER_SIZE	sizeof(struct imsg_hdr)
